<script type="text/javascript">
    $(document).ready(function() {
        // fungsi untuk F1 pada keyboard
//        $("#list_kecamatan").keyup(function(e) {
        $("#btn_check_nomor1").click(function() {
            var tmp_nomor_induk = '';
            for (var i = 1; i < 18; i++) {
                tmp_nomor_induk += $('#' + i).val();
            }
            //alert(tmp_nomor_induk);
            //var tmp_nomor_induk  = $("#nomor_induk").val();
            if ($('#PemilikWp_bukti_diri').val() == 'prompt') {
                padAlert('Silahkan memilih jenis Tanda Bukti Diri Terlebih Dahulu');
            } else {
                $.ajax({
                    type: "POST",
                    url: "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/Select'); ?>",
                    dataType: "json",
                    data: "nomor_induk=" + tmp_nomor_induk + "&jns=" + $('#PemilikWp_bukti_diri').val(),
                    success: function(data) {
                        if (data == null) {
                            $("<div></div>").appendTo("body")
                                    .html("<div>Data tidak ditemukan, silahkan mengisi identitas pribadi</div>")
                                    .dialog({
                                        modal: true, title: "Information ", zIndex: 10000, autoOpen: true, width: "auto", resizable: false,
                                        buttons: {
                                            "Isi Data Pribadi": function() {
                                                setTimeout(function() {
                                                    window.location.href = "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/EntryWp'); ?>";
                                                }, 1000);

                                            },
                                            "Data Pribadi Sudah Diisi": function() {
                                                $(this).dialog("close");
                                            }
                                        },
                                        close: function(event, ui) {
                                            $(this).remove();
                                        }
                                    });
                            $("#nama_pemilik").val('');
                            $("#alamat_pemilik").val('');
                            $("#kecamatan").val('');
                            $("#kelurahan").val('');
                            $("#rt").val('');
                            $("#rw").val('');
                            $("#kode_pos").val('');
                            $("#kabupaten").val('');
                            $("#warga_negara").val('');
                            $("#warga_negara").val('');
                        } else {
                            if (data.length == 0) {
                                padAlert('Data Tidak Ditemukan');
                            }
                            else {
                                $("#nama_pemilik").val(data.nama_pemilik);
                                $("#alamat_pemilik").val(data.alamat_pemilik);
                                $("#kecamatan").val(data.kecamatan);
                                $("#kelurahan").val(data.kelurahan);
                                $("#rt").val(data.rt);
                                $("#rw").val(data.rw);
                                $("#kode_pos").val(data.kode_pos);
                                $("#kabupaten").val(data.kabupaten);
                                $("#warga_negara").val(data.warga_negara);
                                $("#warga_negara").val(data.warga_negara);

                            }
                        }
                    }
                });
            }
        });
    });
    $(document).keyup(function(e) {
        if (e.keyCode == '112') {
            var tmp_nomor_induk = '';
            for (var i = 1; i < 18; i++) {
                tmp_nomor_induk += $('#' + i).val();
            }
            if ($('#PemilikWp_bukti_diri').val() == 'prompt') {
                padAlert('Silahkan memilih jenis Tanda Bukti Diri Terlebih Dahulu');
            } else {
                $.ajax({
                    type: "POST",
                    url: "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/Select'); ?>",
                    dataType: "json",
                    data: "nomor_induk=" + tmp_nomor_induk + "&jns=" + $('#PemilikWp_bukti_diri').val(),
                    success: function(data) {
                        if (data == null) {
                            $("<div></div>").appendTo("body")
                                    .html("<div>Data tidak ditemukan, silahkan mengisi identitas pribadi</div>")
                                    .dialog({
                                        modal: true, title: "Information ", zIndex: 10000, autoOpen: true, width: "auto", resizable: false,
                                        buttons: {
                                            "Isi Data Pribadi": function() {
                                                setTimeout(function() {
                                                    window.location.href = "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/EntryWp'); ?>";
                                                }, 1000);

                                            },
                                            "Data Pribadi Sudah Diisi": function() {
                                                $(this).dialog("close");
                                            }
                                        },
                                        close: function(event, ui) {
                                            $(this).remove();
                                        }
                                    });
                            $("#nama_pemilik").val('');
                            $("#alamat_pemilik").val('');
                            $("#kecamatan").val('');
                            $("#kelurahan").val('');
                            $("#rt").val('');
                            $("#rw").val('');
                            $("#kode_pos").val('');
                            $("#kabupaten").val('');
                            $("#warga_negara").val('');
                            $("#warga_negara").val('');
                        } else {
                            if (data.length == 0) {
                                padAlert('Data Tidak Ditemukan');
                            }
                            else {
                                $("#nama_pemilik").val(data.nama_pemilik);
                                $("#alamat_pemilik").val(data.alamat_pemilik);
                                $("#kecamatan").val(data.kecamatan);
                                $("#kelurahan").val(data.kelurahan);
                                $("#rt").val(data.rt);
                                $("#rw").val(data.rw);
                                $("#kode_pos").val(data.kode_pos);
                                $("#kabupaten").val(data.kabupaten);
                                $("#warga_negara").val(data.warga_negara);
                                $("#warga_negara").val(data.warga_negara);

                            }
                        }
                    }
                });
            }
        } else if (e.keyCode == '113') {
            if ($('#np1').val() == 'prompt') {
                padAlert('Silahkan memilih jenis NPWPD Terlebih Dahulu');
            } else {
                $("#dialog-kecamatan").dialog('open');
            }
        } else if (e.keyCode == '114') {
            if ($('#kode_kec').val() == null) {
                padAlert('Silahkan memilih Kecamatan Terlebih Dahulu');
            } else {
                var kd_kec = $('#kode_kec').val();
//                padAlert('Running F3');
                $.ajax({
                    type: "POST",
                    url: "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/LoadKelurahan'); ?>",
                    dataType: "json",
                    data: "kd_kec=" + kd_kec,
                    success: function(data) {
                        if (data == null) {
                            $("<div></div>").appendTo("body")
                                    .html("<div>Data tidak ditemukan, silahkan mengisi identitas pribadi</div>")
                                    .dialog({
                                        modal: true, title: "Information ", zIndex: 10000, autoOpen: true, width: "auto", resizable: false,
                                        buttons: {
                                            "Isi Data Pribadi": function() {
                                                setTimeout(function() {
                                                    window.location.href = "<?php echo Yii::app()->createUrl('/PendaftaranDanPendataan/RetribusiPribadi/EntryWp'); ?>";
                                                }, 1000);

                                            },
                                            "Data Pribadi Sudah Diisi": function() {
                                                $(this).dialog("close");
                                            }
                                        },
                                        close: function(event, ui) {
                                            $(this).remove();
                                        }
                                    });
                            $("#nama_pemilik").val('');
                            $("#alamat_pemilik").val('');
                            $("#kecamatan").val('');
                            $("#kelurahan").val('');
                            $("#rt").val('');
                            $("#rw").val('');
                            $("#kode_pos").val('');
                            $("#kabupaten").val('');
                            $("#warga_negara").val('');
                            $("#warga_negara").val('');
                        } else {
                            if (data.length == 0) {
                                padAlert('Data Tidak Ditemukan');
                            }
                            else {
                                $("#dialog-kelurahan").dialog('open');
                            }
                        }
                    }
                });
            }
        }
    });

    function PilihKecamatan(aa) {
        var cc = aa.split("#");
        $("#kode_kec").val(cc[0]);
        $("#nama_kec").val(cc[1]);

        $("#dialog-kecamatan").dialog('close');
    }

    function movetoNext(current, nextFieldID) {
        if (current.value.length >= current.maxLength) {
            document.getElementById(nextFieldID).focus();
        }
    }
    //dialog-kecamatan
</script>

<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'horizontalForm',
    'type' => 'horizontal',
    'enableAjaxValidation' => false,
//    'action'=>Yii::app()->createUrl('');
        ));
?>

<legend>Form Pendaftaran Wajib Pajak/Retribusi Pribadi</legend>
<?php echo $form->errorSummary($model); ?>
<div class="row-fluid">
    <div class="span6">
        <div class="control-group ">
            <label class="control-label">No Urut</label>
            <div class="controls">
                <?php
                $query = "SELECT MAX(no_formulir) AS NoFormulir2 FROM data_npwpd";
                $hasil = Yii::app()->db->createCommand($query)->queryRow();
                if ($hasil['noformulir2'] == 0) {
                    $input = 1;
                    $nomor = str_pad($input, 7, "0", STR_PAD_LEFT);  // produces "-=-=-Alien"
                } else {
                    $input = $hasil['noformulir2'] + 1;
                    $nomor = str_pad($input, 7, "0", STR_PAD_LEFT);  // produces "-=-=-Alien"
                }
                $valRef = 'WP' . date('Y') . $nomor;
                echo $form->textField($modelDataNpwpd, 'no_formulir', array('class' => 'span6', 'readonly' => true, 'value' => $valRef, 'maxlength' => 20));
                ?>
            </div>
        </div>
    </div>
    <div class="span6">
        <div class="control-group ">
            <label class="control-label">No Formulir</label>
            <div class="controls">
                <?php
                $query = "SELECT MAX(no_formulir) AS NoFormulir2 FROM data_npwpd";
                $hasil = Yii::app()->db->createCommand($query)->queryRow();
                if ($hasil['noformulir2'] == 0) {
                    $input = 1;
                    $nomor = str_pad($input, 8, "0", STR_PAD_LEFT);  // produces "-=-=-Alien"
                } else {
                    $input = $hasil['noformulir2'] + 1;
                    $nomor = str_pad($input, 8, "0", STR_PAD_LEFT);  // produces "-=-=-Alien"
                }
                ?>
                <?php echo $form->textField($modelDataNpwpd, 'no_formulir', array('id' => 'no_formulir', 'class' => 'span6', 'value' => $nomor, 'readOnly' => true)); ?>
<!--            <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
<input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">-->
            </div>
        </div>
    </div>
</div>
<div class="row-fluid">

</div>
<div class="row-fluid">
    <div class="alert alert-info">A. Tanda Bukti Diri</div>
</div>
<div class="row-fluid">
    <div class="control-group">
        <label class="control-label">Tanda Bukti Diri</label>
        <div class="controls">
            <?php
            echo $form->DropDownList($modelPemilikWp, 'bukti_diri', array(
                'prompt' => 'Pilih',
                'KTP' => 'KTP',
                'SIM' => 'SIM',
                    ), array('class' => 'span2'));
            ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" for="TestForm_textField">Nomor Bukti Diri</label>
        <div class="controls">
<!--                <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 -
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 -
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 -
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 -
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
                 -
                 <input type = "text" name="no_op_input[]"  class="span1" id="nop1" style="width:20px;">
            -->
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="1" onkeyup="movetoNext(this, '2')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="2" onkeyup="movetoNext(this, '3')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="3" onkeyup="movetoNext(this, '4')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="4" onkeyup="movetoNext(this, '5')" maxlength="1" style="width:35px;">
            -
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="5" onkeyup="movetoNext(this, '6')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="6" onkeyup="movetoNext(this, '7')" maxlength="1" style="width:35px;">
            -
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="7" onkeyup="movetoNext(this, '8')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="8" onkeyup="movetoNext(this, '9')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="9" onkeyup="movetoNext(this, '10')" maxlength="1" style="width:35px;">
            -
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="10" onkeyup="movetoNext(this, '11')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="11" onkeyup="movetoNext(this, '12')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="12" onkeyup="movetoNext(this, '13')" maxlength="1" style="width:35px;">
            -
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="13" onkeyup="movetoNext(this, '14')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="14" onkeyup="movetoNext(this, '15')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="15" onkeyup="movetoNext(this, '16')" maxlength="1" style="width:35px;">
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="16" onkeyup="movetoNext(this, '17')" maxlength="1" style="width:35px;">
            -
            <input type = "text" name="no_induk[]" class="span1 numbersOnly" id="17" onkeyup="movetoNext(this, '18')" maxlength="1" style="width:35px;">
            <?php //echo $form->textField($modelPemilikWp, 'nomor_induk', array('id' => 'nomor_induk', 'class' => 'span3 numbersOnly', 'maxlength' => 125));  ?>
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
                'type' => 'info',
                'label' => 'Check Nomor (F1)',
                'htmlOptions' => array('id' => 'btn_check_nomor1')
            ));
            ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="span6">
        <div class="control-group ">
            <label class="control-label">Nama Lengkap</label>
            <div class="controls">
                <?php echo $form->textField($modelDataNpwpd, 'nama_npwpd', array('id' => 'nama_pemilik', 'class' => 'span11', 'readOnly' => true)); ?>
            </div>
        </div>
    </div>
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Alamat Wajib Pajak</label>
            <div class="controls">
                <?php echo $form->textField($modelDataNpwpd, 'alamat_npwpd', array('id' => 'alamat_pemilik', 'class' => 'span10', 'readOnly' => true)); ?>
            </div>
        </div>
    </div>

</div>
<div class="row-fluid">
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Kecamatan</label>
            <div class="controls">
                <!--input type="text" class="span3" readonly id="kecamatan"-->
                <?php echo $form->textField($modelDataNpwpd, 'kecamatan_npwpd', array('id' => 'kecamatan', 'class' => 'span11', 'readOnly' => true)); ?>
            </div>
        </div>
    </div>
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Kelurahan/Desa</label>
            <div class="controls">
                <!--input type="text" class="span4" readonly id="kelurahan"-->
                <?php echo $form->textField($modelDataNpwpd, 'kelurahan_npwpd', array('id' => 'kelurahan', 'class' => 'span10', 'readOnly' => true)); ?>
            </div>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="span6">
        <div class="row-fluid">
            <div class="span6">
                <div class="control-group">
                    <label class="control-label">RT</label>
                    <div class="controls">
                        <!--input type="text" class="span1" style="width:20px; " readonly id="rt"-->
                        <?php echo $form->textField($modelDataNpwpd, 'rt_npwpd', array('id' => 'rt', 'class' => 'span10', 'readonly' => TRUE)); ?>
                    </div>
                </div>
            </div>
            <div class="span6">
                <div class="control-group">
                    <label class="control-label">RW</label>
                    <div class="controls">
                        <!--input type="text" class="span1" style="width:20px;" readonly id="rw"-->
                        <?php echo $form->textField($modelDataNpwpd, 'rw_npwpd', array('id' => 'rw', 'class' => 'span9', 'readOnly' => true)); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Kode Pos</label>
            <div class="controls">
                <input type="text" class="span4"  readonly id="kode_pos">
            </div>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Kabupaten</label>
            <div class="controls">
                <!--input type="text" class="span3" readonly id="kabupaten"-->
                <?php echo $form->textField($modelDataNpwpd, 'kabupaten_npwpd', array('id' => 'kabupaten', 'class' => 'span11', 'readOnly' => true)); ?>
            </div>
        </div>
    </div>
    <div class="span6">
        <div class="control-group">
            <label class="control-label">Kewarganegaraan </label>
            <div class="controls">
                <input type="text" class="span10" readonly id="warga_negara">
            </div>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="control-group">
        <label class="control-label">Telepon </label>
        <div class="controls">
            <?php echo $form->textField($model, 'no_telepon', array('id' => 'no_telepon', 'class' => 'span3')); ?>
            <!--input type="text" class="span3 numbersOnly" -->
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="alert alert-info">B. Kartu Keluarga</div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Nomor KK </label>
        <div class="controls">
            <!--input type="text" class="span3" readonly -->
            <?php echo $form->textField($model, 'nomor_kk', array('id' => 'nomor_kk', 'class' => 'span3')); ?>
        </div>
    </div>
    <div class="control-group ">
        <label class="control-label" >Tanggal KK</label>

        <div class="span2" style="margin:0;">
            <div class="input-group">
                <span class="input-group-addon"><i class="icon-calendar"></i></span>
                <?php
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $model,
                    'attribute' => 'tanggal',
                    // additional javascript options for the date picker plugin
                    'options' => array(
                        'yearRange' => 'c-50:c+20',
                    ),
                ));
                ?>
            </div>
        </div>

    </div>  
</div>  
<div class="row-fluid">
    <div class="alert alert-info">C. Pekerjaan/Usaha</div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Pekerjaan/Usaha </label>
        <div class="controls">
            <?php
            echo $form->radioButtonList($model, 'pekerjaan_usaha', array(
                'Pegawai Negeri',
                'TNI',
                'Polri',
                'Pegawai Swasta',
                'Pemilik Usaha',
                'Lain-lain',
            ));
            ?>

        </div>
    </div>
    <div class="control-group ">
        <label class="control-label" >Nama Instansi </label>
        <div class="controls">
            <!--input type="text" class="span3" -->
            <?php echo $form->textField($model, 'nama_instansi', array('id' => 'nama_instansi', 'class' => 'span3')); ?>
        </div>
    </div>
    <div class="control-group ">
        <label class="control-label" >Alamat Instansi </label>
        <div class="controls">
            <!--input type="text" class="span3" -->
            <?php echo $form->textField($model, 'alamat_instansi', array('id' => 'alamat_instansi', 'class' => 'span3')); ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="alert alert-info">D. Pencatatan</div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Cara Hitung</label>
        <div class="controls">
            <?php
            echo $form->DropDownList($modelDataNpwpd, 'cara_hitung', array(
                'prompt' => 'Pilih',
                '0' => 'Self Assessment (SA)',
                '1' => 'Office Assessment (OA)',
                    ), array('class' => 'span2'));
            ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <label class="control-label">NPWPD</label>
    <div class="control-group">
        <select name="npwpd[]" class="span1" id="np1" onkeyup="movetoNext(this, 'np2')">
            <option value="prompt">Pilih</option>
            <option value="0">P</option>
            <option value="1">I</option>
            <option value="2">R</option>
        </select>
        <input type="text" class="span1" name="npwpd[]" id="np2">
        -
        <input type="text" class="span2" value="000005" name="npwpd[]" id="np3">
        -
        <input type="text" class="span1" id="kode_kec" name="npwpd[]">
        <?php
//        echo $form->dropDownList($modelKecamatan, 'kode_kec', CHtml::listData(Kecamatan::model()->findAll(), 'kode_kec', 'nama_kec','span1'), array('empty' => 'Pilih Kecamatan'));
        ?>
        <button class="btn btn-info" id="btn_kecamatan">F2</button>
        -
        <input type="text" class="span1" name="npwpd[]" id="kd_kel">
        <button class="btn btn-info">F3</button>
    </div>
    <!--<div class="row-fluid">-->
    <!--</div>-->
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Petugas </label>
        <div class="controls">
            <!--input type="text" class="span2" value="Dany Erlangga" -->
            <?php echo $form->textField($modelDataNpwpd, 'petugas_pencatatan', array('id' => 'petugas_pencatatan', 'class' => 'span2', 'value' => 'Dany Erlangga')); ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label">NIP </label>
        <div class="controls">
            <?php echo $form->textField($modelDataNpwpd, 'nip_pencatatan', array('id' => 'nomor_kk', 'class' => 'span3', 'value' => '123070123')); ?>
            <!--input type="text" class="span3" value="123070123" -->
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="alert alert-info">E. Pendataan</div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Petugas </label>
        <div class="controls">
            <!--input type="text" class="span2" value="Dany Erlangga" -->
            <?php echo $form->textField($modelDataNpwpd, 'petugas_pendataan', array('id' => 'petugas_pendataan', 'class' => 'span3', 'value' => 'Dany Erlangga')); ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >NIP </label>
        <div class="controls">
            <!--input type="text" class="span3" value="123070123" -->
            <?php echo $form->textField($modelDataNpwpd, 'nip_pendataan', array('id' => 'petugas_pencatatan', 'class' => 'span3', 'value' => '123070123')); ?>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="control-group ">
        <label class="control-label" >Tanggal Pendataan</label>
        <div class="span2" style="margin:0;">
            <div class="input-group">
                <span class="input-group-addon"><i class="icon-calendar"></i></span>
                <?php
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $modelDataNpwpd,
                    'attribute' => 'tanggal_pendataan',
                    // additional javascript options for the date picker plugin
                    'options' => array(
                        'yearRange' => 'c-50:c+20',
                    ),
                ));
                ?>
            </div>
        </div>
    </div>    
</div>    
<div class="row-fluid">
    <label class="control-label" >Peruntukan NPWPD </label>
    <div class="control-group">
        <div class="controls">

            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option1" id="inlineCheckbox1"> Pajak Hotel </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option2" id="inlineCheckbox2"> Pajak Restoran </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Hiburan </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Reklame </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Penerangan Jalan </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Galian GOL C </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Air Tanah </label>
            </div>
            <div class="checkbox">
                <label class="checkbox">
                    <input type="checkbox" value="option3" id="inlineCheckbox3"> Pajak Parkir
                </label>
            </div>
        </div>
    </div>
</div>


<!--label class="control-label" >Peruntukan NPWPD </label>
<div class="control-group ">
    <div class="controls">
        //<?php
//            echo $form->checkBoxList($model, 'nomor_kk', array(
//                'Pajak Hotel',
//                'Pajak Restoran',
//                'Pajak Hiburan',
//                'Pajak Reklame',
//                'Pajak Penerangan Jalan',
//                'Galian GOL C',
//                'Air Tanah',
//                'Pajak Parkir',
//            ));
//            
?>
    </div>
</div-->
<div class="row-fluid">
    <div class="form-actions">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? 'Simpan' : 'Save',
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? 'Batal' : 'Reset',
        ));
        ?>

    </div>
    <?php $this->endWidget(); ?>
</div>


<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
    'id' => 'dialog-kecamatan',
    'options' => array(
        'title' => 'Cari Data Kecamatan',
        'overflow' => 'scroll',
        'width' => 900,
        'height' => 500,
        'autoOpen' => false,
    ),
));
?>

<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'Kecamatan',
    'dataProvider' => $modelKecamatan->search(),
    'type' => 'striped bordered condensed',
    'columns' => array(
        array(
            'header' => 'Kode Kecamatan',
            'value' => '$data->kode_kec',
        ),
        array(
            'header' => 'Nama Kecamatan',
            'value' => '$data->nama_kec',
        ),
        array(
            'value' => 'CHtml::Button("Pilih",
                array("onClick" => "PilihKecamatan(\'".$data->kode_kec."#".
                $data->nama_kec."\'
                )",
				"class"=>"btn btn-info",
				))',
            'type' => 'raw',
            'htmlOptions' => array(
                'style' => 'text-align:center',
            ),
        ),
    ),
));
?>
<?php
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
    'id' => 'dialog-kelurahan',
    'options' => array(
        'title' => 'Cari Data Kelurahan',
        'overflow' => 'scroll',
        'width' => 900,
        'height' => 500,
        'autoOpen' => false,
    ),
));
?>

<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'Kecamatan',
    'dataProvider' => $modelKelurahan->search(),
    'type' => 'striped bordered condensed',
    'columns' => array(
        array(
            'header' => 'Kode Kelurahan',
            'value' => '$data->kode_kel',
        ),
        array(
            'header' => 'Nama Kelurahan',
            'value' => '$data->nama_kel',
        ),
        array(
            'value' => 'CHtml::Button("Pilih",
                array("onClick" => "PilihKelurahan(\'".$data->kode_kel."#".
                $data->nama_kel."\'
                )",
				"class"=>"btn btn-info",
				))',
            'type' => 'raw',
            'htmlOptions' => array(
                'style' => 'text-align:center',
            ),
        ),
    ),
));
?>
<?php
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
